<?php
namespace Home\Controller;
use Common\Controller\HomeBasicController;
/**
 *
 */
class IndexController extends HomeBasicController {
    public function index(){
        $map = array();
        $info = I('get.');
        if(isset($info['user'])){
          $map['author'] = $info['user'];
        }
        if(isset($info['type'])){
          $map['type_id'] = $info['type'];
        }
        if(isset($info['news_id'])){
          $map['news_id'] = $info['news_id'];
        }
        $page = $_REQUEST['p']?$_REQUEST['p']:1;
        $pageSize = $_REQUEST['pageSize']?$_REQUEST['pageSize']:2;
        $count = D('News')->getNewsCount($map);
        $map['is_pass'] = array('eq',1);
        $newsList = D('News')->getNewsList($page,$pageSize,$map);
        if(isset($info['p'])){
          $newsList = D('News')->getNewsList($page,$pageSize,$map);
          return ajaxReturn(200,)
        }
        $this->assign('list',$newsList);
        $this->display();
    }
    public function list(){
      
    }
}
